import {useState} from 'react'
import {Routes, Route, Link,NavLink} from 'react-router-dom'
import User from "./page/user.jsx";
import Goods from "./page/goods.jsx";
import Info from "./page/info.jsx";
import './App.css'
import Index from "./page/index.jsx";
function App() {
    const [count, setCount] = useState(0)

    return (
        <div className={"home"}>
            <div className={"nav"}>
                <div className={"btn"}>
                    <NavLink to='/'>首页</NavLink>
                </div>
                <div className={"btn"}>
                    <NavLink to='/user'>User</NavLink>
                </div>
                <div className={"btn"}>
                    <NavLink to='/goods'>Goods</NavLink>
                </div>
                <div className={"btn"}>
                    <NavLink to='/info'>Info</NavLink>
                </div>
            </div>
            <div className={"content"}>
                <Routes>
                        <Route path='/user' element={<User/>}/>
                        <Route path='/goods' element={<Goods/>}/>
                        <Route path='/info' element={<Info/>}/>
                        <Route path='/' element={<Index/>}/>
                </Routes>
            </div>
        </div>
    )
}

export default App
